const http = require('http')

http.createServer(function(request,response){
    response.writeHead(200,{'Content-Type':'text/plain'});
    //nodejs请求第三方接口，不存在跨域
    http.get('https://blog.csdn.net/simon803/article/details/7784682',(data)=>{
        console.log(data)
        //nodejs帮前端请求，请求后的值传给前端
        response.end('Hello World\n');
    })
    //发送响应数据 'Hello World'

}).listen(3000)